<?php


namespace App\Api\Fcjd;
use PhalApi\Api;
use PhalApi\Exception\BadRequestException;

/**
 * 非常检单-App信息展示
 *
 * @author: dogstar <chanzonghuang@gmail.com> 2014-10-04
 */
class PhoneApp extends Api
{

    public function getRules()
    {
        return array(
            'GetPhoneAppList' => array(
                'state' => array('name' => 'state', 'require' => true, 'min' => 1, 'max' => 50, 'desc' => 'state')
            ),
          
        );
    }


    /**
     * 获取PhoneApp的App信息
     * @desc App信息
     * @return array data 获取App信息
     * @exception 400 非法请求，参数传递错误
     */

    public function GetPhoneAppList()
    {
        $state = $this->state;
        $phoneApplist = \PhalApi\DI()->notorm->phone_app->select('*')->where('state', $state)->fetchAll();
        return $phoneApplist; 
    }
}
